/*********************************************
regular expression

*********************************************/
//import java.io.Console;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){

	Scanner scanner=new Scanner(System.in);
	String str="abcdefgabcabc";
	System.out.println(str.replaceAll(".bc","###"));	
	System.out.println("Pls input cell phone number:");
	str=scanner.next();

	//check cell phone number---------------------------------
	if(str.matches("09[0-9]{2}-?[0-9]{6}"))
		System.out.println("\"R\"ight");
	else
		System.out.println("\"F\"alse");


	System.out.println("Pls input email:");
	str=scanner.next();

	//check email---------------------------------
//	if(str.matches("[_a-z0-9-]+([.][_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-])*&"))
	if(str.matches("[_a-z0-9-]+([.][_a-z0-9-]+)*@[a-z0-9-]+([.][a-z0-9-]+)*"))

		System.out.println("\"R\"ight");
	else
		System.out.println("\"F\"alse");






/*
	Console console=System.console();
	String name=console.readLine("input name:");
	
	char[] passwd=console.readPassword("input passwd:");
	System.out.println("name="+name);
	System.out.println("passwd="+new String(passwd));
*/
    }
}
